package start.designMode.agency;

import start.designMode.decorator.Circle;
import start.designMode.decorator.Shape;

public class CircleProxy implements Shape {

    private Circle circle;

    @Override
    public void draw() {
        if(circle == null){
            circle = new Circle();
        }
        // 可以在调用真实对象方法前后添加额外操作
        System.out.println("Before displaying (proxy)");
        circle.draw();
        System.out.println("After displaying (proxy)");
    }
}
